import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import gCom from './comon';

Vue.use(ElementUI);
Vue.config.productionTip = false;
for (let key in gCom) {
  Vue.component(key, gCom[key]);
}
Vue.prototype.$del = function del(callback) {
  this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(() => {
      callback();
    })
    .catch(() => {
      this.$message({
        type: "info",
        message: "已取消删除",
      });
    });
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
